@extends('default.layouts.personalPublic')
@section('title', '隐私设置')
@section('headcss')
    @parent
    <link rel="stylesheet" href="{{asset('/default/css/personal/privacy.css')}}">
@endsection
@section('rightcon')
    <div class="right">

        <!--简历设置-->
        <div class="jright">
            <div class="content">
                <div class="jobtitle">
                    <div class="tithead">
                        <h2>隐私设置</h2>
                    </div>
                </div>
                <div class="setresume">
                    <form name='thisForm' id='thisForm' method='post' action="{{url('personal/privacy')}}">
                        <input name="resume_id" type="hidden" value="{{$resume->id}}">
                        <input name="type"  type="hidden" value="up">
                        {{csrf_field()}}
                        <!--保密设置-->
                        <div class="stitle">保密设置</div>
                                   <span class="secrecy">
                                   <input name="resume_status" type="radio" class="selradio" value="1" id="radio"/>
                                   <label for="radio">完全公开</label>
                                   </span> <span class="secrecy">
                                   <input name="resume_status" type="radio" value="2" class="selradio" id="radio2"/>
                                   <label for="radio2">不公开（任何人都搜索不到您的简历，只有主动投递给企业才能查看）</label>
                                   </span> <span class="secrecy">
                                   <input name="resume_status" type="radio" value="3" class="selradio" id="radio3"/>
                                   <label for="radio3">完全保密（直接关闭简历，不能通过任何方式查看您的简历）</label>
                                   </span>
                        <div class="save">
                            <input id="savebutton" type="submit" class="savebutton" value="保存"/>
                        </div>
                    </form>
                    <!--屏蔽企业-->
                    <div class="stitle shield">屏蔽企业</div>
                    <div class="filtration">您一定不希望您的简历被现在的公司看到，把它写进来过滤掉吧！最多可以过滤10家！</div>
                    <div class="search">
                        <form name="shieldFrom" id="shieldFrom" method="post" action="{{url('personal/privacy')}}"  onSubmit="return checkkeword()">
                            <input name="id"  type="hidden" value="{{$resume->id}}">
                            <input name="type"  type="hidden" value="sql">
                            {{csrf_field()}}

                            <div class="sleft">
                                <input name="keyword" type="text" value="" placeholder="请输入要屏蔽的企业名称" id="keyword"/>
                            </div>
                            <div class="sright">
                                <input name="sub" class="subsearch" value="搜索" type="submit">
                            </div>
                        </form>
                    </div>
                    <div class="issecrecy">
                        <div class="ilist" id="ilist">
                            <div class="stle">已屏蔽企业</div>
                            <ul class="one">
                                {{--循环公司名--}}
                                @foreach($shieldArr as $v)
                                    <li><span><a>{{$v['company_name']}}</a></span><i id="{{$v['company_uid']}}" ></i><em></em></li>
                                @endforeach
                            </ul>
                            <div class="stopper"></div>
                        </div>
                    </div>

                    <!--请稍候...-->
                    <div class="comlist" id="comlist">
                        <ul class="two">
                            {{--循环公司名--}}
                            @if(count($seachCom) > 0)
                                @foreach($seachCom as $v)
                                    <li><span><a>{{$v['company_name']}}</a></span><i id="{{$v['company_uid']}}"></i><em></em></li>
                                @endforeach
                            @endif
                        </ul>
                        @if(!empty($companycount) &&  count($seachCom) <= 0)
                            <div id="searchshile" style="font-size:16px; color:#F60"><span>您搜索到的关键字查询不到记录，或者已经被屏蔽</span></div>
                        @endif
                    </div>
                </div>
            </div>
        </div>

    </div>
@endsection
@section('footerjs')
    @parent
    <script>
        $('#privacy').addClass('on').find('i').css('background-position','-26px -91px');
        var _token = "{{csrf_token()}}";
        $(function(){
            {{--设置radio--}}
            radio_checked(document.thisForm.resume_status,'{{$resume_status}}');
        });
        @if(session('ok'))
        layer.ready(function(){
            layer.msg("{{session('ok')}}",{icon:6,time:1500});
        });
        @endif
    </script>
    <script type="text/javascript" src="{{asset('/default/js/personal/privacy.js')}}"></script>
@endsection